package com.szh.zh.fallback;

import com.szh.zh.feign.SysUserFeignApi;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;

@Slf4j
public class SysUserFeignApiFallbackFactory implements FallbackFactory<SysUserFeignApi> {
    @Override
    public SysUserFeignApi create(Throwable cause) {
        return new SysUserFeignApi() {
            @Override
            public Boolean isLogin() {
                log.error("checkLogin ------ 异常{}",cause);
                return false;
            }
        };
    }
}
